%dw 2.0
var A = payload.ClientCode
var B = payload.Aadhar_No
var StartTime = "16:36:00" as Time
var EndTime = "20:00:00" as Time
var ExactNowTime1 = (((now()>> "IST") [11 to 18]) as Time)
var ExactNowTime2 = ((substring((now() >> "IST"), 11, 19)) as Time)
fun check(ExactNowTime1)= if (ExactNowTime1 >= StartTime and ExactNowTime1 <= EndTime) "True" else "False"
output application/json
import * from dw::core::Strings
---
{
way1: substring(A, 2,6),
way2: A [2 to 5],
lastvalue: B last 10,
Randomuuid: uuid(),
randomNumber: random() last 4,
IndainStandardTimeWay1: (substring((now() >> "IST"), 11, 19)) as Time,
IndainStandardTimeway2: ((now()>> "IST") [11 to 18]) as Time,
ExactNow1: ExactNowTime1,
ExactNow2: ExactNowTime2,
checkStartime: StartTime,
checckEndtime: EndTime,
ValidateTheTimeWay1: if (((substring((now() >> "IST"), 11, 19)) as Time) >= StartTime and ((substring
((now() >> "IST"), 11, 19)) as Time) <= EndTime) "True" else "False",
ValidateTheTimeWay2: if((((now()>> "IST") [11 to 18]) as Time) >= StartTime and (((now()>> "IST") [11
to 18]) as Time) <= EndTime) "True" else "False",
DateTodayIST1: ((now()>> "IST") [0 to 9]) as Date,
DateTodayIST2: substring((now() >> "IST"), 0, 10) as Date,
TimeChecking: check(ExactNowTime1),
"\$TryingDollar1": A,
"\$TyingDollar2": B
}